package com.gugee.tiktok.deploy.consumer.music.controller;


import com.gugee.tiktok.data.common.msg.HashtagMessage;
import com.gugee.tiktok.data.consumer.challenge.core.service.ChallengeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
//@RequestMapping("config")
public class NacosConfigControllerTest {

    @Autowired
    ChallengeService challengeService;


    @RequestMapping(path = "/send")
    public void sendFoo() {
        // List<Map<String,Object>> musics = JdbcTemplateHelper.select("select * from music order by user_count desc limit 0,100");
        List<HashtagMessage> musicMessageList = new ArrayList<>();
        HashtagMessage hashtagMessage = new HashtagMessage();
        hashtagMessage.setHid(19011);
        musicMessageList.add(hashtagMessage);
        challengeService.updateChallenge(musicMessageList);

        /*for (int i = 0; i <1000 ; i++) {

            challengeService.getQrCode(229207l);

        }*/
    }

}
